-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(web): add custom scripts plugin #17
Conversation
"license": "MIT", | ||
"dependencies": { | ||
"express": "^4.19.2", | ||
"serverless-http": "^3.2.0" | ||
}, | ||
"devDependencies": { | ||
"serverless-domain-manager": "^7.4.0", | ||
"serverless-plugin-scripts": "^1.0.2" | ||
"serverless-domain-manager": "^7.4.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This project uses npm workspaces, so don't forget to run npm i
in the root to update the lock files.
@@ -0,0 +1,69 @@ | |||
import { execSync } from "child_process"; | |||
|
|||
class Scripts { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add inline comments to provide more context for users who might not be familiar with plugins. A few things to cover...
- Why it exists - to run custom scripts, which we need to run the build script at deploy time, with support for variable resolution from framework, as well as proper stdio handling.
- How this works - it runs because it's included as a plugin in serverless.yml, and how hooks work.
This gives us control over the child process running the script, so that we can suppress its output.